/*
 * @Author: zxh
 * @Date: 2024-07-19 17:04:33
 * @LastEditors: zxh
 * @LastEditTime: 2024-07-30 14:09:18
 * @Description: 请填写简介
 */
import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'

//引入初始化项目文件
import '@/styles/common.scss'

//引入懒加载指令插件并且注册
import { lazyPlugin } from './directives'
// 引入全局组件插件
import { componentPlugin } from '@/components'

const app = createApp(App) // 以App作为参数生成一个应用实例对象
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 以插件形式注册
app.use(pinia)
app.use(router)
app.use(lazyPlugin)
app.use(componentPlugin)

app.mount('#app') //挂载到id为app的节点上
